class BaseEntity<T> {
  String msg;
  int pages;
  String flag;
  String code;
  T datas;
  int totalCount;

  BaseEntity(
      {this.msg,
      this.pages,
      this.flag,
      this.code,
      this.datas,
      this.totalCount});

  BaseEntity.fromJson(Map<String, dynamic> json) {
    msg = json['msg'];
    pages = json['pages'];
    flag = json['flag'];
    code = json['code'];
    datas = json['datas'];
    totalCount = json['totalCount'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['msg'] = this.msg;
    data['pages'] = this.pages;
    data['flag'] = this.flag;
    data['code'] = this.code;
    data['datas'] = this.datas;
    data['totalCount'] = this.totalCount;
    return data;
  }
}
